from django.shortcuts import render
from rest_framework.generics import ListAPIView
# Create your views here.
from . import models
from . import serializer
from lyapi.settings import contains


class BannerView(ListAPIView):
	queryset = models.Banner.objects.filter(is_show=True,is_deleted=False).order_by('orders')[0:contains.BANNER_LENGTH]
	serializer_class = serializer.BannerModelSerializer

class NavtopView(ListAPIView):
	queryset = models.Nav.objects.filter(is_show=True,is_deleted=False,position=1).order_by('orders')[0:contains.NAVTOP_LENGTH]
	serializer_class = serializer.NavModelSerializer
